
import { LoginResultVo } from "@/models/userinfo/LoginResultVo";
import { UserInfoAddDto } from "@/models/userinfo/UserInfoAddDto";
import { UserLoginDto } from "@/models/userinfo/UserLoginDto";
import { UserProductInfo } from "@/models/userinfo/UserProductInfo";
import { http } from "@/utils/http";

/**
 * 
 * @param goodsSerachDto 搜索条件
 * @returns 
 */
export async function userLogin(loginDto: UserLoginDto) {
    return await http.post<LoginResultVo>("/api/user/login",loginDto);
}


export async function getUserInfo(id: string) {
    return await http.get<UserInfoAddDto>(`admin/user/manage/detail/${id}`)
}

export async function getCurrentUserProducts(){
    return await http.post<UserProductInfo>(`/api/user/current-user/product`,{})
}

export async function checkUserProduct(frontPath:string){
    return await http.post(`/api/user/check/product`,{frontPath})
}